frontend: added temperature gauge to assistant form#901
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #901 +/- ##
==========================================
- Coverage 77.84% 77.81% -0.03%
==========================================
Files 259 259
Lines 11177 11181 +4
==========================================
Hits 8701 8701
- Misses 2476 2480 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
EugeneLightsOn
left a comment
There was a problem hiding this comment.
Great PR, Eric! Just one small nit, and it’s ready to go.
src/interfaces/assistants_web/src/components/AgentSettingsForm/ConfigStep.tsx
Outdated
Show resolved
Hide resolved
tianjing-li
left a comment
There was a problem hiding this comment.
Seems the backend already had a temperature value on Agents.
Did you check that the Agent's updated temperature value gets set in the chat_request, see process_chat()
I think you might need to set it like these lines
# Set the agent settings in the chat request
chat_request.model = agent.model
chat_request.preamble = agent.preamble
Otherwise frontend changes lgtm
The backend uses the temperature passed with the ChatRequest when the chat endpoint is called. I think this is better then defaulting to what is set on the Model because it allows a user to potentially change the temperature between messages. I have the frontend take the value from the model and pass it with the request to the backend. We keep this business logic in the frontend and leave the backend more flexible and scalable. |
|
@ezawadski I believe the opposite might happen if we don't enforce these values being used by the backend. We could send |
tianjing-li
left a comment
There was a problem hiding this comment.
Looks great thank you
Added the Slider Component from the Coral Web interface to the Assistants Web interface.
Added Temperature Setting to Assistant Create and Update forms. This setting is then used when chatting with the assistant.
AI Description
This PR introduces a new
temperatureparameter to theAgentSettingsFormcomponent and its associated types, allowing users to set the temperature for agents. Thetemperatureparameter is now included in theCreateAgentSettingsFieldsandUpdateAgentSettingsFieldstypes, as well as in theConfigStepcomponent.temperatureparameter is added to theAgentSettingsFormcomponent'sConfigStepcomponent, allowing users to set the temperature for agents.temperatureparameter is included in theCreateAgentSettingsFieldsandUpdateAgentSettingsFieldstypes, ensuring that the temperature is considered when creating or updating agents.temperatureparameter is set to a default value of0.3in theDEFAULT_AGENT_TEMPERATUREconstant.temperatureparameter is added to theChat.tsxcomponent, enabling the setting of the temperature for the agent.temperatureparameter is included in theUpdateAgent.tsxcomponent, allowing the temperature to be updated for the agent.temperatureparameter is added to theCreateAgent.tsxcomponent, enabling the setting of the temperature for the agent during creation.temperatureparameter is included in theparamsSlice.tsfile, ensuring that the temperature is considered when creating or updating agents.